<template>
    <el-config-provider :locale="locale" namespace="el">
        <suspense>
            <router-view />
        </suspense>
    </el-config-provider>
</template>

<script setup>
import { computed, ref } from 'vue'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import en from 'element-plus/dist/locale/en.mjs'
import store from './store/index'
import {createAppProviderContext} from '@/utils/useAppContext'
import settings from '@/settings.js'
//const locale = ref(zhCn)

const appLocale = computed(() => store.state.app.locale);
const locale = computed(() => {
  return appLocale.value === 'zh_CN' ? zhCn : en
})

const prefixCls = ref(settings.prefixCls)
createAppProviderContext({ prefixCls });


</script>


<style scoped>

</style>
